//
// CBoneBase.java
// Copyright (C) 2010  "Naush" <naush _ hotmail _ fr>
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as
// published by the Free Software Foundation, either version 3 of the
// License, or (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
// GNU Affero General Public License for more details.
//
// You should have received a copy of the GNU Affero General Public License
// along with this program.  If not, see <http://www.gnu.org/licenses/>./* ----------------------------------------------------------------------------







package org.ryzom.nel.threed;

import org.ryzom.nel.misc.CRefCount;
import org.ryzom.nel.misc.CVector;
import org.ryzom.nel.misc.IStream;

public class CBoneBase extends CRefCount {
  private long swigCPtr;

  public CBoneBase(long cPtr, boolean cMemoryOwn) {
    super(nel3dJNI.CBoneBase_SWIGUpcast(cPtr), cMemoryOwn);
    swigCPtr = cPtr;
  }

  public static long getCPtr(CBoneBase obj) {
    return (obj == null) ? 0 : obj.swigCPtr;
  }

  protected void finalize() {
    delete();
  }

  public synchronized void delete() {
    if (swigCPtr != 0) {
      if (swigCMemOwn) {
        swigCMemOwn = false;
        nel3dJNI.delete_CBoneBase(swigCPtr);
      }
      swigCPtr = 0;
    }
    super.delete();
  }

  public void setName(String value) {
    nel3dJNI.CBoneBase_Name_set(swigCPtr, this, value);
  }

  public String getName() {
    return nel3dJNI.CBoneBase_Name_get(swigCPtr, this);
  }

  public void setInvBindPos(SWIGTYPE_p_NLMISC__CMatrix value) {
    nel3dJNI.CBoneBase_InvBindPos_set(swigCPtr, this, SWIGTYPE_p_NLMISC__CMatrix.getCPtr(value));
  }

  public SWIGTYPE_p_NLMISC__CMatrix getInvBindPos() {
    long cPtr = nel3dJNI.CBoneBase_InvBindPos_get(swigCPtr, this);
    return (cPtr == 0) ? null : new SWIGTYPE_p_NLMISC__CMatrix(cPtr, false);
  }

  public void setFatherId(int value) {
    nel3dJNI.CBoneBase_FatherId_set(swigCPtr, this, value);
  }

  public int getFatherId() {
    return nel3dJNI.CBoneBase_FatherId_get(swigCPtr, this);
  }

  public void setUnheritScale(boolean value) {
    nel3dJNI.CBoneBase_UnheritScale_set(swigCPtr, this, value);
  }

  public boolean getUnheritScale() {
    return nel3dJNI.CBoneBase_UnheritScale_get(swigCPtr, this);
  }

  public void setDefaultPos(CTrackDefaultVector value) {
    nel3dJNI.CBoneBase_DefaultPos_set(swigCPtr, this, CTrackDefaultVector.getCPtr(value), value);
  }

  public CTrackDefaultVector getDefaultPos() {
    return new CTrackDefaultVector(nel3dJNI.CBoneBase_DefaultPos_get(swigCPtr, this), true);
  }

  public void setDefaultRotEuler(CTrackDefaultVector value) {
    nel3dJNI.CBoneBase_DefaultRotEuler_set(swigCPtr, this, CTrackDefaultVector.getCPtr(value), value);
  }

  public CTrackDefaultVector getDefaultRotEuler() {
    return new CTrackDefaultVector(nel3dJNI.CBoneBase_DefaultRotEuler_get(swigCPtr, this), true);
  }

  public void setDefaultRotQuat(CTrackDefaultQuat value) {
    nel3dJNI.CBoneBase_DefaultRotQuat_set(swigCPtr, this, CTrackDefaultQuat.getCPtr(value), value);
  }

  public CTrackDefaultQuat getDefaultRotQuat() {
    return new CTrackDefaultQuat(nel3dJNI.CBoneBase_DefaultRotQuat_get(swigCPtr, this), true);
  }

  public void setDefaultScale(CTrackDefaultVector value) {
    nel3dJNI.CBoneBase_DefaultScale_set(swigCPtr, this, CTrackDefaultVector.getCPtr(value), value);
  }

  public CTrackDefaultVector getDefaultScale() {
    return new CTrackDefaultVector(nel3dJNI.CBoneBase_DefaultScale_get(swigCPtr, this), true);
  }

  public void setDefaultPivot(CTrackDefaultVector value) {
    nel3dJNI.CBoneBase_DefaultPivot_set(swigCPtr, this, CTrackDefaultVector.getCPtr(value), value);
  }

  public CTrackDefaultVector getDefaultPivot() {
    return new CTrackDefaultVector(nel3dJNI.CBoneBase_DefaultPivot_get(swigCPtr, this), true);
  }

  public void setLodDisableDistance(float value) {
    nel3dJNI.CBoneBase_LodDisableDistance_set(swigCPtr, this, value);
  }

  public float getLodDisableDistance() {
    return nel3dJNI.CBoneBase_LodDisableDistance_get(swigCPtr, this);
  }

  public void setSkinScale(CVector value) {
    nel3dJNI.CBoneBase_SkinScale_set(swigCPtr, this, CVector.getCPtr(value), value);
  }

  public CVector getSkinScale() {
    long cPtr = nel3dJNI.CBoneBase_SkinScale_get(swigCPtr, this);
    return (cPtr == 0) ? null : new CVector(cPtr, false);
  }

  public CBoneBase() {
    this(nel3dJNI.new_CBoneBase(), true);
  }

  public void serial(IStream f) {
    nel3dJNI.CBoneBase_serial(swigCPtr, this, IStream.getCPtr(f), f);
  }

}
